package com.aivin.firplugin.dialog;
import com.aivin.firplugin.tool.ResourceTool;
import com.aivin.firplugin.view.ApkUpload;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.DialogWrapper;
import org.jetbrains.annotations.Nullable;

import javax.swing.*;


public class ApkUploadDialog extends DialogWrapper {
    private ApkUpload apkUpload;


    public ApkUploadDialog(@Nullable Project project ,
                           String apkPath ,
                           String bundleID ,
                           String api_token ,
                           String updateLog) {
        super(project);
        this.setResizable(false);
        apkUpload = new ApkUpload(apkPath ,bundleID ,api_token ,updateLog);
        setOKButtonText( ResourceTool.instance().getString("doneOk") );
        setCancelButtonText( ResourceTool.instance().getString("cancel"));
        init();
    }

    @Nullable
    @Override
    protected JComponent createCenterPanel() {
        return apkUpload.getApkuploadPanel() ;
    }

}
